//业务加载
$(function() {
	//用户信息
	$('#xxx').bind('click', function() {
		$.ajax({
			type: "post",
			url: ajaxUrl + "/game/1.0/player/home.js",
			data: {
				token: window.localStorage.getItem('token'),
				jobId: getTimeMs()
			},
			dataType: "json",
			success: function(request) {
				console.log(request);
				if (request.code == "0") {
					window.localStorage.setItem('token', request.token);
					top.location.href = "home.html";
				} else {
					securityCodeImgReLoad();
					$('#msg').text(request.msg)
				}
			},
			error: function(error) {
				console.log(error);
			}
		});
	});
});

function buttonClick(type) {
	//功能跳转
	switch (type) {
		case 61: // 庄园<br>农场
			top.location.href = "sfg/game.html";
			break;
		case 62: // 梦幻<br>卡片
			break;
		case 63: // 星空<br>传奇
			break;
		case 64: // 英雄<br>命运
			top.location.href = "rpg/game.html";
			break;
		case 65: // 无尽<br>战争
			break;
		case 66: // 休闲<br>社区
			break;
		default:  //提示信息

			return;
	}
}
